﻿@model YeaTrip.Web.Models.Account.LoginModel
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <title>Login</title>
    <script src="@Url.JS("Framework/jquery-1.4.4.min.js")" type="text/javascript"></script>
    <script src="@Url.JS("Framework/jquery.metadata.js")" type="text/javascript"></script>
    <script src="@Url.JS("Framework/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.JS("Framework/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
    <script type="text/javascript">
        $.validator.addMethod("inputlength", function (value, element, param) {
            flag = false;
            var maxlength = parseInt(param);
            if (value == "" || value == null) {
                return true;
            }
            if (value.length < maxlength) {
                flag = true;
            }
            return flag;
        }, "chh");
        $.validator.unobtrusive.adapters.addSingleVal("inputlength", "maxlength");
    </script>
</head>
<body>
    @using (Html.BeginRouteForm("Default", new { action = "Login", controller = "Account" }, FormMethod.Post, new { id = "LoginForm" }))
    {
        <div>
            <p>
                用户名：@Html.TextBoxFor(m => m.Account)
                @Html.ValidationMessageFor(m => m.Account)
            </p>
            <p>
                密码：@Html.TextBoxFor(m=>m.Password)
                @Html.ValidationMessageFor(m => m.Password)
            </p>
            <p>
                <input type="submit" value="Log In" />
            </p>
        </div>
    }
</body>
</html>
